/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mx.itschapala.dsw2.RegistroES.modelo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Ricky
 */
@Entity
@Table(name = "register2t")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Register2t.findAll", query = "SELECT r FROM Register2t r"),
    @NamedQuery(name = "Register2t.findByIdRegisterT", query = "SELECT r FROM Register2t r WHERE r.idRegisterT = :idRegisterT"),
    @NamedQuery(name = "Register2t.findByOutHR", query = "SELECT r FROM Register2t r WHERE r.outHR = :outHR"),
    @NamedQuery(name = "Register2t.findByOutDR", query = "SELECT r FROM Register2t r WHERE r.outDR = :outDR"),
    @NamedQuery(name = "Register2t.findByOutMR", query = "SELECT r FROM Register2t r WHERE r.outMR = :outMR"),
    @NamedQuery(name = "Register2t.findByOutYR", query = "SELECT r FROM Register2t r WHERE r.outYR = :outYR")})
public class Register2t implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idRegisterT")
    private Integer idRegisterT;
    @Basic(optional = false)
    @NotNull
    @Column(name = "OutHR")
    @Temporal(TemporalType.TIMESTAMP)
    private Date outHR;
    @Basic(optional = false)
    @NotNull
    @Column(name = "OutDR")
    @Temporal(TemporalType.TIMESTAMP)
    private Date outDR;
    @Basic(optional = false)
    @NotNull
    @Column(name = "OutMR")
    @Temporal(TemporalType.TIMESTAMP)
    private Date outMR;
    @Basic(optional = false)
    @NotNull
    @Column(name = "OutYR")
    @Temporal(TemporalType.TIMESTAMP)
    private Date outYR;
    @JoinColumn(name = "idEmployee", referencedColumnName = "idEmployeeT")
    @ManyToOne(optional = false)
    private Employeet idEmployee;

    public Register2t() {
    }

    public Register2t(Integer idRegisterT) {
        this.idRegisterT = idRegisterT;
    }

    public Register2t(Integer idRegisterT, Date outHR, Date outDR, Date outMR, Date outYR) {
        this.idRegisterT = idRegisterT;
        this.outHR = outHR;
        this.outDR = outDR;
        this.outMR = outMR;
        this.outYR = outYR;
    }

    public Integer getIdRegisterT() {
        return idRegisterT;
    }

    public void setIdRegisterT(Integer idRegisterT) {
        this.idRegisterT = idRegisterT;
    }

    public Date getOutHR() {
        return outHR;
    }

    public void setOutHR(Date outHR) {
        this.outHR = outHR;
    }

    public Date getOutDR() {
        return outDR;
    }

    public void setOutDR(Date outDR) {
        this.outDR = outDR;
    }

    public Date getOutMR() {
        return outMR;
    }

    public void setOutMR(Date outMR) {
        this.outMR = outMR;
    }

    public Date getOutYR() {
        return outYR;
    }

    public void setOutYR(Date outYR) {
        this.outYR = outYR;
    }

    public Employeet getIdEmployee() {
        return idEmployee;
    }

    public void setIdEmployee(Employeet idEmployee) {
        this.idEmployee = idEmployee;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idRegisterT != null ? idRegisterT.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Register2t)) {
            return false;
        }
        Register2t other = (Register2t) object;
        if ((this.idRegisterT == null && other.idRegisterT != null) || (this.idRegisterT != null && !this.idRegisterT.equals(other.idRegisterT))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mx.itschapala.dsw2.RegistroES.modelo.Register2t[ idRegisterT=" + idRegisterT + " ]";
    }
    
}
